//
//  YLBankCardListTableViewCell.m
//  YLFinanceService
//
//  Created by she1323 on 2017/11/7.
//  Copyright © 2017年 she1323. All rights reserved.
//

#import "YLBankCardListTableViewCell.h"
#import "YLMyInfoModel.h"
@interface YLBankCardListTableViewCell()

@property (weak, nonatomic) IBOutlet UIView *baseView;
@property (weak, nonatomic) IBOutlet UILabel *bankNameLabel;
@property (weak, nonatomic) IBOutlet UILabel *bankCodeLabel;

@end

@implementation YLBankCardListTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    _baseView.backgroundColor = [UIColor whiteColor];
    _baseView.layer.shadowOpacity = 0.7f;
    _baseView.layer.shadowColor = [UIColor grayColor].CGColor;
    _baseView.layer.shadowRadius = 6;
    _baseView.layer.shadowOffset = CGSizeMake(4, 4);
}

- (void)setModel:(YLMyInfoModel *)model
{
    _model = model;
    _bankNameLabel.text = model.authBankName;
    NSString *authBankCode = model.authBankCode;
    if (model.authBankCode.length > 5) {
        authBankCode = [model.authBankCode substringWithRange:NSMakeRange(authBankCode.length - 4, 4)];
    }
    _bankCodeLabel.text = [NSString stringWithFormat:@"尾号%@", authBankCode];
    
}

+ (NSString *)cellID
{
    return @"YLBankCardListTableViewCell";
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

}

@end
